package com.nwpu.coursesupport.mapper;

import java.util.List;

import com.nwpu.coursesupport.criteria.BatchDealAnswerSearchCriteria;
import com.nwpu.coursesupport.criteria.TaskSubmitResultSearchCriteria;
import com.nwpu.coursesupport.entity.TaskSubmitResult;
import org.apache.ibatis.annotations.Param;

public interface TaskSubmitResultMapper extends BaseMapper<TaskSubmitResult>{
	
	public int batchSave(List<TaskSubmitResult> list);
	   
	public boolean submitTask(TaskSubmitResult taskResult);
	
	public boolean batchReviewTask(TaskSubmitResult taskResult);
	
	public boolean reviewTask(TaskSubmitResult taskResult);
	
	public boolean shareTask(TaskSubmitResult taskResult);
	
	public boolean updateStatus(TaskSubmitResult taskResult);
	
	public boolean updateAnswerStatus(TaskSubmitResult taskResult);
	
	public boolean batchUpdateAnswerVisible(BatchDealAnswerSearchCriteria sc);
	
	public List<Integer> findByIds(TaskSubmitResultSearchCriteria sc);

	public List<TaskSubmitResult> findTaskSubmitResultById(Integer id);

    Double findSumScoreByAssignID(@Param("id")List<Integer> id);

    Double findAnsNumByAssignID(@Param("id")List<Integer> id);

	Double findMidScoreByAssignID(@Param("id")List<Integer> id);

    Double findStdScoreByAssignID(@Param("id")List<Integer> id);

    Double findTopScoreByAssignID(@Param("id")List<Integer> id);

	Double findLowScoreByAssignID(@Param("id")List<Integer> id);

    List<Double> findAllStuScore(@Param("id")List<Integer> id);

	List<String> findAllStuName(@Param("id")List<Integer> id);

    List<Integer> findAllStuID(@Param("id")List<Integer> id);
}
